<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>echarts</title>
    <style>
      .container {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="container"></div>
    <script src="./echarts.js"></script>
    <script>
      const myEcharts = echarts.init(document.querySelector(".container"));

      const option = {
        xAxis: {
          data: [
            "一月",
            "二月",
            "三月",
            "四月",
            "五月",
            "六月",
            "七月",
            "八月",
            "九月",
            "十月",
            "十一月",
            "十二月",
          ],
        },
        yAxis: {},
        dataset: {
          source: [
            ["一月", 11, 22, "xx", 33],
            ["二月", 22, 32, "yy", 44],
            ["三月", 15, 26, "zz", 55],
            ["四月", 35, 36],
            ["五月", 45, 46],
            ["六月", 55, 56],
            ["七月", 65, 66],
            ["八月", 75, 76],
            ["九月", 55, 86],
            ["十月", 95, 66],
            ["十一月", 75, 46],
            ["十二月", 25, 26],
          ],
        },
        series: [
          {
            type: "bar",
            encode: { x: 0, y: 1 },
          },
          {
            type: "line",
            encode: { x: 0, y: 2 },
          },
          {
            type: "pie",
            radius: [0, 50],
            center: [600, 60],
            encode: { itemName: 3, value: 4 },
          },
        ],
      };

      myEcharts.setOption(option);
    </script>
  </body>
</html>
